package com.luaj.elasticsearch.common.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author 卢安杰
 * @date 2020-11-20 19:24
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CommonRes {
    private String status;
    private Object data;
    public static CommonRes create(Object result){
        return new CommonRes("success",result);
    }
    public static CommonRes create(Object result,String status){
        return new CommonRes(status,result);
    }

    public static CommonRes fail(Object result){
        return new CommonRes("fail",result);
    }
}
